package com.mall.shopping.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.shopping.constants.ShoppingRetCode;
import lombok.Data;

@Data
public class ProductDTORequest extends AbstractRequest {

    Long id;

    // 参数检查的方法
    @Override
    public void requestCheck() {

        if (id == null) {
//            throw new ValidateException("004073","必要的参数不能为空");

            throw new ValidateException(ShoppingRetCode.REQUISITE_PARAMETER_NOT_EXIST.getCode(),ShoppingRetCode.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }

    }
}
